/* GoldTree 管理系统样式文件 */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
}

.layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 250px;
    background: #001529;
    color: white;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.sidebar-logo h1 {
    margin: 0;
    color: #1890ff;
    font-size: 20px;
}

.sidebar-logo p {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #999;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: #1890ff;
    color: white;
    border-left-color: #40a9ff;
}

.sidebar-menu a.active {
    background: #1890ff;
    color: white;
    border-left-color: #40a9ff;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 0;
}

.header {
    background: white;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    margin: 0;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content {
    padding: 24px;
}

.page {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page.active {
    display: block;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #1890ff;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #1890ff;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #40a9ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

.tag-success {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.tag-warning {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffe58f;
}

.tag-error {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.table th {
    background: #fafafa;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1890ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

/* 导入功能样式 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 0;
}

.import-section {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
}

.form-text {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.progress {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-bar {
    height: 100%;
    background: #1890ff;
    width: 0%;
    transition: width 0.3s ease;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.stat-item {
    text-align: center;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

.stat-value.success { color: #52c41a; }
.stat-value.error { color: #ff4d4f; }
.stat-value.warning { color: #faad14; }
.stat-value.info { color: #1890ff; }

.error-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    margin-bottom: 4px;
    color: #cf1322;
}

/* 筛选栏样式 */
.filters-bar {
    background: #fafafa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group .form-control {
    width: auto;
    min-width: 150px;
}

/* 表格样式增强 */
.table-container {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-info {
    background: #1890ff;
    color: white;
}

.btn-warning {
    background: #faad14;
    color: white;
}

.btn-secondary {
    background: #8c8c8c;
    color: white;
}

.btn:hover {
    opacity: 0.8;
}

/* 分页样式增强 */
.pagination-container {
    background: #fafafa;
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    border-radius: 0 0 6px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #666;
    font-size: 14px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-selector select {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover:not([disabled]) {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.pagination-btn[disabled] {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e8e8e8;
}

.pagination-number {
    padding: 6px 12px;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 32px;
    text-align: center;
}

.pagination-number:hover {
    background: #e6f7ff;
    border-color: #91d5ff;
    color: #1890ff;
}

.pagination-number.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
    font-weight: 500;
}

.pagination-ellipsis {
    padding: 6px 4px;
    color: #999;
    font-size: 14px;
}

.pagination-single-page {
    padding: 6px 12px;
    color: #666;
    font-size: 14px;
    background: #f0f0f0;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.page-jumper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.page-jumper input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.page-jumper input:focus {
    border-color: #40a9ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .pagination-info {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-jumper {
        justify-content: center;
    }
    
    .pagination-btn,
    .pagination-number {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
}

/* 批量操作栏 */
.bulk-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
}

/* ========== 桌面应用特有样式 ========== */

/* 桌面应用模式标识 */
.app-mode-badge {
    display: inline-block;
    background: #52c41a;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    margin-left: 12px;
    vertical-align: middle;
}

/* 桌面应用主体样式 */
.desktop-app {
    user-select: none; /* 禁止文本选中 */
}

.desktop-app .sidebar {
    user-select: none;
}

.desktop-app .table {
    user-select: text; /* 表格内容允许选中 */
}

.desktop-app input, 
.desktop-app textarea {
    user-select: text; /* 输入框允许选中 */
}

/* 桌面应用窗口状态 */
.desktop-app.window-focused {
    /* 窗口获得焦点时的样式 */
}

.desktop-app.window-blurred {
    /* 窗口失去焦点时的样式 */
    opacity: 0.95;
}

/* 桌面应用滚动条优化 */
.desktop-app ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.desktop-app ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.desktop-app ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.desktop-app ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 桌面应用按钮优化 */
.desktop-app .btn {
    transition: all 0.2s ease;
}

.desktop-app .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.desktop-app .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 桌面应用动画优化 */
.desktop-app .modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.desktop-app .modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 桌面应用卡片阴影优化 */
.desktop-app .card,
.desktop-app .stat-card,
.desktop-app .table-container {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.desktop-app .card:hover,
.desktop-app .stat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* 桌面应用状态指示器 */
.desktop-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 2000;
    display: none;
}

.desktop-app .desktop-status-indicator {
    display: block;
}

/* 桌面应用快捷键提示 */
.shortcut-hint {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

/* 桌面应用文件拖拽区域 */
.file-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone.drag-over {
    border-color: #1890ff;
    background: #f0f8ff;
}

.file-drop-zone:hover {
    border-color: #1890ff;
    background: #f9f9f9;
}

/* 桌面应用自定义滚动条（Firefox） */
.desktop-app {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 桌面应用窗口控制按钮样式（如果需要） */
.window-controls {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    z-index: 3000;
    height: 30px;
}

.window-control-btn {
    width: 45px;
    height: 30px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.window-control-btn:hover {
    background: rgba(0,0,0,0.1);
}

.window-control-btn.close:hover {
    background: #e81123;
    color: white;
}

/* 响应式设计优化（桌面应用） */
@media (max-width: 1200px) {
    .desktop-app .sidebar {
        width: 200px;
    }
    
    .desktop-app .main-content {
        margin-left: 200px;
    }
}

/* 高分辨率屏幕优化 */
@media (min-resolution: 2dppx) {
    .desktop-app .btn,
    .desktop-app .form-control {
        border-width: 0.5px;
    }
}